package org.onvivals.module.iot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.onvivals.common.base.BaseEntity;

import java.io.Serial;

@Schema(description="设备用户信息")
@Data
@TableName(value = "iot_device_user")
public class IotDeviceUser extends BaseEntity<IotDeviceUser> {

	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
	@Schema(description="ID")
	private Long id;

	/**
	 * 设备ID
	 */
	@TableField(value = "device_id")
	@Schema(description="设备ID")
	private String deviceId;

	@TableField(value = "nickname")
	@Schema(description="昵称")
	private String nickname;

	@TableField(value = "food")
	@Schema(description="喜欢的食物")
	private String food;

	@TableField(value = "sport")
	@Schema(description="喜欢的运动")
	private String sport;

	@TableField(value = "birthday")
	@Schema(description="生日")
	private String birthday;

	@TableField(value = "constellation")
	@Schema(description="星座")
	private String constellation;

	@TableField(value = "work")
	@Schema(description="工作")
	private String work;
}
